<template lang="pug">
    div
        | Login...
</template>

<script>
import { ssoService } from "@/service/SsoService";

export default {
  methods: {
    async login() {
      await ssoService.getJwtByToken(this.token);
      this.$router.replace("/service");
    }
  },
  computed: {
    token() {
      return this.$route.query["token"];
    }
  },
  mounted() {
      if(this.token){
          this.login()
      }
  },
  watch:{
      login(ov,v){
          this.login()
      }
  }
};
</script>
